package com.amos.boot.annotation;

import java.lang.annotation.*;

/**
 * PROJECT: boot
 * DESCRIPTION: 空字符串 <---互转---> null
 *
 * @author amos.wang
 * @date 2019/4/30
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MethodStringBlankNull {

    Convert convert() default Convert.BLANK_2_NULL;

    enum Convert {
        /**
         * 空字符串转化为null
         */
        BLANK_2_NULL,
        /**
         * null转化为空字符串
         */
        NULL_2_BLANK
    }

}
